<template>
  <el-input v-number:[comFloat]="precision" :value="value" v-bind="$attrs" v-on="$listeners" />
</template>
<script>
export default {
  name: 'CInputNumber',
  inheritAttrs: false,
  props: {
    float: {
      type: Boolean,
      default: false
    },
    value: {
      type: [String, Number],
      default: ''
    },
    precision: {
      type: Number,
      default: 2
    }
  },
  computed: {
    comFloat() {
      return this.float ? 'float' : ''
    }
  }
}
</script>
